<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core">
  
	
	

<ui:composition template="/template/templategiris.xhtml">
	<ui:define name="baslik">Marmara Üniversitesi Kitaphane Kulübü</ui:define>
    
  

	<ui:define name="ekran">
	
		  <p:panel header="Kitap Kayıt Ekranı"   >
                      
 <h:form id="kayit" prependId="false" >
	          <h:panelGrid columns="3" id="giris1">
                   
					<b>Dil Türü:</b>
				        
					<p:inputText value="#{dilKayitBean.dil.dilTipi}"
						id="kitapadi" required="true"
						requiredMessage="Dil Türü Boş Geçilemez!" />
					<p:message for="kitapadi" />
										                
	             </h:panelGrid>
	
				      
				<br />
				<br />
				<p:commandButton value="Kaydet"
					actionListener="#{dilKayitBean.kayit}" update="kitapdetay,giris1" style="width:80px;text-align:center" />
				<span style="padding-left: 10px"></span>	
			    <p:commandButton value="Düzenle"
					actionListener="#{dilKayitBean.duzenle}" update="kitapdetay,giris1" style="width:80px;text-align:center" />	
                <span style="padding-left: 10px"></span>                
                 <p:commandButton value="Yeni"
					actionListener="#{dilKayitBean.yeni}" update="kitapdetay,giris1" style="width:80px;text-align:center" />					
				<br />
				<br />
			
</h:form>

<h:form id="kitapdetay" >
           
				<p:dataTable value="#{dilKayitBean.dilListeleri}" id="giris2"
					var="dil" style="border:1px #66aaff;text-align:center" rows="12" height="180"  scrollable="true" liveScroll="true"
					width="600"  paginator="true" selectionMode="single" rendered="#{not empty dilKayitBean.dilListeleri}">
					
					
					<f:facet name="header">Dil Bilgileri</f:facet>

   
        			
                  
                    <p:column style="width:200px">
						<f:facet name="header">
                            Dil
                           </f:facet>
						<h:outputText value="#{dil.dilTipi}" />
						
					</p:column>


					<p:column style="width:200px">
						<f:facet name="header"> İşlemler</f:facet>

						<h:commandLink value="Düzenle" update="giris2">

							<f:setPropertyActionListener value="#{dil}"
								target="#{dilKayitBean.dil}" />

						</h:commandLink>

						<span style="padding-left: 20px"></span>

                               

						<h:commandLink value="Sil" action="#{dilKayitBean.sil}">
					         	                
                                   <f:setPropertyActionListener value="#{dil}"
								target="#{dilKayitBean.dil}" />
								 
                        </h:commandLink>   
                               
                        

					</p:column>

				</p:dataTable>
				<br />
				<br />
                  <c:if  test="#{empty dilKayitBean.dilListeleri}">
                 
                   <div><h3>Kayıtlı Kitap Yoktur.</h3></div>
                      
                   </c:if>
</h:form>
		</p:panel>
		
	</ui:define>

</ui:composition>

</html>
